package edu.zut.vlog.mapper;

import edu.zut.vlog.pojo.Article;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Intellij IDEA
 * Author: yi cheng
 * Date: 2022/5/7
 * Time: 18:19
 **/
@Mapper
@Repository
public interface ArticleMapper {
    List<Article> queryAllArticles();
    //查询我的文章
    List<Article> queryAllByAuthorId(Integer authorId);
    int addArticle(int authorid,String title,String content);
    //根据文章id查询文章
    Article getArticleById(int id);

    int updateArticle(Article article);

    //根据文章id删除文章
    int deleteArticleById(int id);
    //模糊根据标题查询文章
    List<Article> queryArticleLikeTitle(String title);


}
